package com.icode.core.model.house;

import com.icode.core.model.AbstractEntity;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: lb
 * Date: 15-11-13
 * Time: 下午5:33
 * To change this template use File | Settings | File Templates.
 */

@Entity
@Table(name = "banner_for_app_images")
public class FirstBanners extends AbstractEntity{

    @ManyToOne
    @JoinColumn(name = "banner_for_app_id")
    private BannerForApp bannerForApp;

    @ManyToOne (cascade = CascadeType.ALL)
    @JoinColumn(name = "image_id")
    private  UploadImage image;



    public UploadImage image() {
        return image;
    }

    public BannerForApp bannerForAppBase() {
        return bannerForApp;
    }

    public FirstBanners() {
    }

    public FirstBanners( BannerForApp bannerForApp,UploadImage image) {
        this.image = image;
        this.bannerForApp = bannerForApp;
    }
}
